Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark watch parameter as Boolean #603

Closed
wants to merge 1 commit into from

Conversation

tpetricek
Copy link
Collaborator

I was running fable using:

fable --target dev -w src

which did not work because the command line options parser parsed src as a parameter of watch rather than as the default projFile option, i.e. {"watch":[ "src" ]}. Marking the watch parameter as Boolean fixes the problem! 🎉

@tpetricek
Copy link
Collaborator Author

Hmm, it seems that the purpose of the watch flag has changed, so now the correct use is

fable --watch src --target dev src

Where --watch takes a list of paths to watch? Because with my change, I later get an error from rollup (which is trying to watch the list of things passed to --watch).

If this is the new behaviour, then that's probably OK, though I guess the following is ambiguous:

fable --watch src

😕 ❓

@alfonsogarciacaro
Copy link
Member

Yeah, I didn't think of this case 😕 I always put the source path at the beginning (fable src --watch).

I still need to document it, but --watch has become more flexible because some users needed to specify the directories to be watched. Now, besides a boolean, --watch also accepts a string or a string array.

I should update the documentation quickly. Babies and OSS are not a good combo 🍼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants